﻿

using Common.Result;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;

namespace ApiService.Controllers
{
    [Route("api/[controller]")]
    [ApiController]
    public class HomeController : ControllerBase
    {
        [HttpGet("depart/{key}")]
        [Authorize]
        public async Task<JsonResult> GetDepartments([FromRoute] string key)
        {
            ApiResult result = new ApiResult()
            {
                Success = true,
                Message="cs"
            };
            return await Task.FromResult(new JsonResult(result));
        }
    }
}
